package com.zhongzhi.javafx.controller;

import java.net.URL;
import java.util.ResourceBundle;

import org.springframework.http.client.OkHttp3ClientHttpRequestFactory;

import com.zhongzhi.common.Common;

import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.stage.Stage;

public class cloudController implements Initializable{
	@FXML
	private Button ok;
	@FXML
	private Button on;
	@Override
	public void initialize(URL arg0, ResourceBundle arg1) {
		ok.setOnAction(new EventHandler<ActionEvent>() {
			
			@Override
			public void handle(ActionEvent arg0) {
				Stage window = (Stage)ok.getScene().getWindow();
				window.close();
				window = (Stage)Common.getSp().getScene().getWindow();
				window.close();
				System.exit(0);
			}
		});
		
		on.setOnAction(new EventHandler<ActionEvent>() {
			
			@Override
			public void handle(ActionEvent arg0) {
				Stage window = (Stage)on.getScene().getWindow();
				window.close();
			}
		});
		
	}

	
}
